<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="./css/bootstrap.min.css">
    <link href="https://cdn.bootcss.com/layer/2.3/skin/layer.css" rel="stylesheet">
    <link rel="stylesheet" href="./icon/iconfont.css">
    <link rel="stylesheet" href="./autoUpload.css">
</head>

<body>
<div class="container">
    <div class="row">
        <form action="" method="POST" enctype="multipart/form-data" id="uploadData">
            <div class="form-group col-sm-12 col-md-12">
                <label class="col-sm-2 col-md-2">附件：</label>
                <div class=" col-sm-8 col-md-8">
                    <div class="userSelectImg">
                        <i class="iconfont iconupload"></i>
                        上传文件
                        <input type="file" multiple id="fileName">
                    </div>
                </div>
            </div>
            <div class="form-group col-sm-12 col-md-24">
                <ul id="showImg" style="width: 300px">
                    <li class="show-img">
                        <!--<i class=" iconfont iconfujian fl"></i>-->
                        <!--<p class="file-name">文件名.png</p>-->
                        <!--<p class="progress-bar"></p>-->
                        <!--<em class="percentage-bar"></em>-->
                        <!--<em class="percentage-number">0%</em>-->
                        <!--<a class="delete-img default-hide" title="删除" href="javascript:;">删除</a>-->
                        <!--<i class="iconfont iconclose fr" title="取消上传"></i>-->
                        <!--<i class="iconfont iconreload" title="重新上传"></i>-->
                    </li>
                </ul>
            </div>
        </form>
    </div>
</div>
</body>
<script src="./jquery/1.9.1/jquery.js"></script>
<script src="https://cdn.bootcss.com/layer/2.3/layer.js"></script>
<script src="./autoUpload.js"></script>
<script>
    // console.log(window.location.href.split('://')[0]+"://localhost:8081/file_upload")
    var localAddress = window.location.href.split('://')[0]+"://localhost:8081/file_upload",
        remote = "http://www.gryns.cn:8081/file_upload";
    $('#fileName').ajaxUpLoad({
        url:remote, // 地址
        imgBox: "showImg", // 图片显示的盒子--id
        uploadForm:"uploadData", // form 表单id
        data: 'image', // 参数
        num: 3 // 上传图片限制
    })
</script>

</html>